home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #14 / Monster Media No. 14 (April 1996) (Monster Media, Inc.).ISO / prog_d / inictl12.zip / ID_MAIN.PAS < prev    next >
Pascal/Delphi Source File  |  1996-01-14  |  6KB  |  221 lines

  1. unit Id_main;
  2.  
  3. {
  4.  
  5. $Log:   W:/users/prodigy/prodig~1/archive/inifile/id_main.pav  $
  6.  * 
  7.  *    Rev 1.21   14 Jan 1996 11:56:24   PaulK
  8.  * Changes to permit bitmapped RBs
  9.  * 
  10.  *    Rev 1.0   13 Jan 1996 18:56:32   PaulK
  11.  * Initial revision.
  12.  
  13. }
  14.  
  15. interface
  16.  
  17. uses
  18.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  19.   Forms, Dialogs, StdCtrls, ExtCtrls, TabNotBk, IniCtrls, Grids, Buttons;
  20.  
  21. type
  22.   TForm1 = class(TForm)
  23.     TabbedNotebook1: TTabbedNotebook;
  24.     WinIniSource: TIniSource;
  25.     SolIniSource: TIniSource;
  26.     IniEdit1: TIniEdit;
  27.     IniNEdit1: TIniNEdit;
  28.     IniNEdit2: TIniNEdit;
  29.     IniNEdit3: TIniNEdit;
  30.     IniGrid1: TIniGrid;
  31.     IniRadioButton1: TIniRadioButton;
  32.     Image1: TImage;
  33.     IniRadioButton2: TIniRadioButton;
  34.     Image2: TImage;
  35.     IniRadioButton3: TIniRadioButton;
  36.     Image3: TImage;
  37.     IniRadioButton4: TIniRadioButton;
  38.     Image4: TImage;
  39.     IniRadioButton5: TIniRadioButton;
  40.     Image5: TImage;
  41.     IniRadioButton6: TIniRadioButton;
  42.     Image6: TImage;
  43.     IniRadioButton7: TIniRadioButton;
  44.     Image7: TImage;
  45.     IniRadioButton8: TIniRadioButton;
  46.     Image8: TImage;
  47.     IniRadioButton9: TIniRadioButton;
  48.     Image9: TImage;
  49.     IniRadioButton10: TIniRadioButton;
  50.     Image10: TImage;
  51.     IniRadioButton11: TIniRadioButton;
  52.     Image11: TImage;
  53.     IniRadioButton12: TIniRadioButton;
  54.     Image12: TImage;
  55.     IniRadioButton13: TIniRadioButton;
  56.     IniRadioButton14: TIniRadioButton;
  57.     IniRadioButton15: TIniRadioButton;
  58.     IniRadioButton16: TIniRadioButton;
  59.     IniRadioButton17: TIniRadioButton;
  60.     IniCheckBox1: TIniCheckBox;
  61.     IniCheckBox2: TIniCheckBox;
  62.     IniCheckBox3: TIniCheckBox;
  63.     IniCheckBox4: TIniCheckBox;
  64.     IniCheckBox5: TIniCheckBox;
  65.     Btn_Next: TButton;
  66.     Btn_Finish: TButton;
  67.     Btn_Back: TButton;
  68.     Btn_Save: TButton;
  69.     Btn_View: TButton;
  70.     Btn_Play: TButton;
  71.     Btn_Licence: TBitBtn;
  72.     ListBox1: TListBox;
  73.     ListBox2: TListBox;
  74.     Label1: TLabel;
  75.     Label2: TLabel;
  76.     Label3: TLabel;
  77.     Label4: TLabel;
  78.     Label5: TLabel;
  79.     Label6: TLabel;
  80.     Label7: TLabel;
  81.     Label8: TLabel;
  82.     Label9: TLabel;
  83.     Label10: TLabel;
  84.     Label11: TLabel;
  85.     Label12: TLabel;
  86.     Label13: TLabel;
  87.     Label14: TLabel;
  88.     Label15: TLabel;
  89.     Label16: TLabel;
  90.     Label18: TLabel;
  91.     Label19: TLabel;
  92.     Label20: TLabel;
  93.     Label21: TLabel;
  94.     Label22: TLabel;
  95.     Label23: TLabel;
  96.     Label24: TLabel;
  97.     Label25: TLabel;
  98.     Label26: TLabel;
  99.     Label27: TLabel;
  100.     Label28: TLabel;
  101.     Label29: TLabel;
  102.     Label30: TLabel;
  103.     Label31: TLabel;
  104.     Bevel1: TBevel;
  105.     Bevel2: TBevel;
  106.     Bevel3: TBevel;
  107.     Bevel4: TBevel;
  108.     Bevel5: TBevel;
  109.     Bevel6: TBevel;
  110.     Bevel7: TBevel;
  111.     GroupBox1: TGroupBox;
  112.     GroupBox2: TGroupBox;
  113.     Label34: TLabel;
  114.     procedure TabbedNotebook1Change(Sender: TObject; NewTab: Integer;
  115.       var AllowChange: Boolean);
  116.     procedure WinIniSourceActivate(Sender: TObject);
  117.     procedure ListBox1Click(Sender: TObject);
  118.     procedure ListBox2Click(Sender: TObject);
  119.     procedure Btn_BackClick(Sender: TObject);
  120.     procedure Btn_SaveClick(Sender: TObject);
  121.     procedure Btn_NextClick(Sender: TObject);
  122.     procedure Btn_FinishClick(Sender: TObject);
  123.     procedure Btn_ViewClick(Sender: TObject);
  124.     procedure Btn_PlayClick(Sender: TObject);
  125.     procedure Btn_LicenceClick(Sender: TObject);
  126.     procedure SolIniSourceChange(Sender: TObject);
  127.   private
  128.     { Private declarations }
  129.   public
  130.     { Public declarations }
  131.   end;
  132.  
  133. var
  134.   Form1: TForm1;
  135.  
  136. implementation
  137.  
  138. {$R *.DFM}
  139.  
  140. procedure TForm1.Btn_NextClick(Sender: TObject);
  141. begin
  142. with tabbednotebook1 do
  143.   pageindex := (pageindex + 1) mod pages.count;
  144. end;
  145.  
  146. procedure TForm1.Btn_FinishClick(Sender: TObject);
  147. begin
  148. close;
  149. end;
  150.  
  151. procedure TForm1.Btn_BackClick(Sender: TObject);
  152. begin
  153. with tabbednotebook1 do
  154.   pageindex := (pageindex - 1) mod pages.count;
  155. end;
  156.  
  157. procedure TForm1.TabbedNotebook1Change(Sender: TObject; NewTab: Integer;
  158.   var AllowChange: Boolean);
  159. begin
  160. Btn_Back.visible := newtab <> 0;
  161. Btn_Next.enabled := newtab <> pred(tabbednotebook1.pages.count);
  162. Btn_Save.visible := newtab in [3,6];
  163. Btn_View.visible := Btn_Save.visible;
  164. Btn_Play.visible := Btn_Save.visible;
  165. if newtab in [3,6] then
  166.   Btn_Save.enabled := SolIniSource.Modified;
  167. end;
  168.  
  169. procedure TForm1.Btn_SaveClick(Sender: TObject);
  170. begin
  171. SolIniSource.save;
  172. Btn_Save.enabled := SolIniSource.Modified;
  173. end;
  174.  
  175. procedure TForm1.WinIniSourceActivate(Sender: TObject);
  176. begin
  177. ListBox1.Clear;
  178. WinIniSource.Inifile.ReadSection('Compatibility',ListBox1.items);
  179. ListBox2.Clear;
  180. WinIniSource.Inifile.ReadSection('PrinterPorts',ListBox2.items);
  181. end;
  182.  
  183. procedure TForm1.ListBox1Click(Sender: TObject);
  184. begin
  185. IniNEdit3.Keyword := Listbox1.Items[ListBox1.itemindex];
  186. end;
  187.  
  188. procedure TForm1.ListBox2Click(Sender: TObject);
  189. begin
  190. with IniGrid1 do
  191.   begin
  192.   Keyword := Listbox2.Items[ListBox2.itemindex];
  193.   Cells[0,0] := 'Driver:';
  194.   Cells[0,1] := 'Port:';
  195.   Cells[0,2] := 'Device timeout:';
  196.   Cells[0,3] := 'Retry timeout:';
  197.   end;
  198. end;
  199.  
  200. procedure TForm1.Btn_ViewClick(Sender: TObject);
  201. begin
  202. WinExec ('notepad.exe sol.ini', sw_ShowNormal);
  203. end;
  204.  
  205. procedure TForm1.Btn_PlayClick(Sender: TObject);
  206. begin
  207. WinExec ('sol.exe', sw_ShowNormal);
  208. end;
  209.  
  210. procedure TForm1.SolIniSourceChange(Sender: TObject);
  211. begin
  212. Btn_Save.Enabled := SolIniSource.Modified;
  213. end;
  214.  
  215. procedure TForm1.Btn_LicenceClick(Sender: TObject);
  216. begin
  217. Application.HelpContext(5000);
  218. end;
  219.  
  220. end.
  221.